/******************************************************************************
*@file  : app.c
*@brief : UART Demos 
******************************************************************************/
#include "app.h"

UART_HandleTypeDef  UART1_Handle;
UART_HandleTypeDef  UART2_Handle;

/******************************************************************************
*@brief : APP_HRNG_Test
*@param : none
*@return: none
******************************************************************************/
void APP_HRNG_Test(void)
{
	uint32_t i;
	uint32_t j;
    uint8_t data_buf[64];
    
    printfS(" HRNG Test Start!\r\n\r\n");

	for(i = 8; i <= 64; i+=8)
	{
		printfS("get random number: %d\n", i);
		if(HAL_HRNG_GetHrng(data_buf, i))
		{
			printfS("random number is error\n");
			return;
		}
		for(j = 0; j < i; j++)
		{
			printfS("%x", data_buf[j]);
		}
		printfS("\n");
	}	

    printfS("\n HRNG Test End!\n");

}
